<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Question</title>
    {% load static %}
    <link rel="stylesheet" type="text/css" href="{% static 'erp/style.css' %}">
</head>
<body>
{% if question_list %}
    <ul>
        {% for question in question_list %}
            <li><a href="{% url 'erp:detail' question.id %}">{{ question.question_text }}</a></li>
        {% endfor %}
    </ul>
    {% if page_obj %}
        <div class="pagination">
        <span class="step-links">
            <span class="btn btn-default">
                Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
            </span>
            {% if page_obj.has_previous %}
                <a class="btn btn-primary" href="?page=1">第一页</a>
                <a class="btn btn-primary" href="?page={{ page_obj.previous_page_number }}">上一页</a>
            {% endif %}

            {% if page_obj.has_next %}
                <a class="btn btn-primary" href="?page={{ page_obj.next_page_number }}">下一页</a>
                <a class="btn btn-primary" href="?page={{ page_obj.paginator.num_pages }}">最后一页</a>
            {% endif %}
        </span>
        </div>
    {% endif %}
{% else %}
    <p>No question are available.</p>
{% endif %}
</body>
</html>